$5gi - 4h - 8i - 2 = h - 6i - 6$ Solve for $g$.
Combine constant terms on the right. $5gi - 4h - 8i - {2} = h - 6i - {6}$ $5gi - 4h - 8i = h - 6i - {4}$ Combine $i$ terms on the right. $5gi - 4h - {8i} = h - {6i} - 4$ $5gi - 4h = h + {2i} - 4$ Combine $h$ terms on the right. $5gi - {4h} = {h} + 2i - 4$ $5gi = {5h} + 2i - 4$ Isolate $g$ ${5}g{i} = 5h + 2i - 4$ $g = \dfrac{ 5h + 2i - 4 }{ {5i} }$